package com.example.distribued.lock.control;

import com.example.distribued.lock.service.StockService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ash
 * @description
 * @create 2024/4/1  20:46:43
 * @className StockController
 * @verson 1.0.0
 */
@RestController
public class StockController {

    @Resource
    private StockService stockService;

    @RequestMapping("/stock/deduct")
    public String deduct() {
        stockService.deduct();
        return "stock deduct success!!";
    }
}
